﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace QYmall.Core.Model.ViewModels
{
    /// <summary>
    /// 商户资金日志(显示)
    /// </summary>
    public class MerchantAmountLogDto : MerchantAmountLogEditDto
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        public long Id { get; set; }

        /// <summary>
        /// 交易时间
        /// </summary>
        [Display(Name = "交易时间")]
        public DateTime AddTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 已删除：0否1是
        /// </summary>
        [Display(Name = "状态")]
        [Range(0, 9)]
        public byte IsDelete { get; set; } = 0;

        /// <summary>
        /// 店铺名称
        /// </summary>
        [Display(Name = "店铺名称")]
        [StringLength(512)]
        public string? MerchantTitle { get; set; }
    }

    /// <summary>
    /// 商户资金日志(编辑)
    /// </summary>
    public class MerchantAmountLogEditDto
    {
        /// <summary>
        /// 所属商户ID
        /// </summary>
        [Display(Name = "所属商户")]
        public int MerchantId { get; set; }

        /// <summary>
        /// 收支金额
        /// </summary>
        [Display(Name = "收支金额")]
        [Column(TypeName = "decimal(18, 2)")]
        public decimal Amount { get; set; } = 0M;

        /// <summary>
        /// 备注说明
        /// </summary>
        [Display(Name = "备注说明")]
        [StringLength(512)]
        public string? Remark { get; set; }
    }
}
